import React from 'react';
import {StyleSheet, View, ScrollView} from 'react-native';
import {StackNavigator} from 'react-navigation';
import List from './list';
import Nav from './nav';

export default class App extends React.Component {
    linkToDetail = () => {
        this.props.navigation.navigate('articleImages');
    };

    render() {
        return (
            <View style={styles.container}>
                <Nav/>
                <ScrollView style={{flex: 1}}>
                    <List linkToDetail={this.linkToDetail}/>
                </ScrollView>
            </View>
        );
    }
}

const styles = StyleSheet.create({
    container: {
        backgroundColor: '#f6f6f5',
        flex: 1
    }
});
